#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2023/11/26 15:50
# @Author  : 新猿异码
# @Site    : https://gitee.com/chshao/autotest
# @CSDN    : https://blog.csdn.net/m0_37576542?type=blog
# @File    : ConfWriter.py
# @Desc    : 模块功能描述
# @Software: PyCharm
import yaml


class ConfWriter(object):

    @staticmethod
    def write(data, yaml_file):
        with open(yaml_file, 'w', encoding='utf-8') as f:
            yaml.dump(data=data, stream=f, allow_unicode=True)


if __name__ == '__main__':
    msg = {'loop_times': 1, 'report_path': 'a', 'work_mode': 0, 'testcases': []}
    ConfWriter.write(msg, ".config.yaml")

